﻿@using System.Data
@using ZoomLa.Common
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.cols = 10;
}

<table id="EGV" class="table table-striped table-bordered table-hover">
    <tr><td></td><td class="td_s">ID</td><td>知识点</td><td>科目</td><td>所属年级</td><td>创建人</td><td>启用</td><td>类型</td><td>创建时间</td><td>操作</td></tr>
    @if (Model.itemCount > 0)
    {
        foreach (DataRow dr in Model.dt.Rows)
        {
            <tr data-layer="1" data-id='@dr["k_id"]' ondblclick="location.href = 'AddKnowledge?id=@dr["k_id"]&nid=@Request.QueryString["nid"]';">
                <td><input type="checkbox" name="idchk" data-name="@dr["k_name"]" value="@dr["k_id"]" /></td>
                <td>@dr["k_id"]</td>
                <td onclick="ShowChild(this);" data-child="@dr["ChildCount"]"><a href='javascript:;'><span data-type='icon' class='@(DataConverter.CLng(dr["ChildCount"]) > 0 ? "fa fa-folder" : "fa fa-file")'></span></a> <a href='AddKnowledge?id=@dr["k_id"]&nid=@Request.QueryString["nid"]'>@dr["k_name"]</a></td>
                <td>@dr["C_ClassName"]</td>
                <td>@dr["GradeName"]</td>
                <td>@dr["UserName"]</td>
                <td>@MvcHtmlString.Create(DataConverter.CLng(dr["Status"]) == 0 ? "<span style='color:red;'>禁用</span>" : "<span style='color:green'>启用</span>" )</td>
                <td>@(DataConverter.CLng(dr["IsSys"]) == 1 ? "系统" : "自定义" )</td>
                <td>@DataConverter.CDate(dr["CDate"]).ToString("yyyy-MM-dd HH:mm")</td>
                <td>
                    <a href='AddKnowledge?id=@dr["k_id"]&nid=@Request.QueryString["nid"]' class="option_style" title='修改'><span class='fa fa-pencil option_style'></span>修改</a>
                    <a href="javascript:;" class="option_style" onclick='mvcpage.del({ url: "Knowledge_Del", ids: @dr["k_id"] });'><i class='fa fa-trash-o option_style'></i>删除</a>
                </td>
            </tr>
        }
    }
    else
    {
        <tr><td colspan="10">当前没有数据</td></tr>
    }
    @Html.Partial("_page", Model)
</table>